
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="MOBAN">

<meta name="description" content="">
<meta name="keywords" content="bootstrap, bootstrap5">
<link rel="preconnect" href="https://fonts.googleapis.com/">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
<link href="static/css/css2.css" rel="stylesheet">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/flaticon.css">
<link rel="stylesheet" href="static/css/bootstrap-icons.css">
<link rel="stylesheet" href="static/css/tiny-slider.css">
<link rel="stylesheet" href="static/css/aos.css">
<link rel="stylesheet" href="static/css/glightbox.min.css">
<link rel="stylesheet" href="static/css/style1.css">
<link rel="stylesheet" href="static/css/flatpickr.min.css">
<link rel="short icon" href="images/28.jpg">
<title>知文招标网 - 类别搜索</title>
</head>
<body>
	<div class="site-mobile-menu site-navbar-target">
		<div class="site-mobile-menu-header">
			<div class="site-mobile-menu-close">
				<span class="icofont-close js-menu-toggle"></span>
			</div>
		</div>
		<div class="site-mobile-menu-body"></div>
	</div>
	<nav class="site-nav">
		<div class="container"  id="chw">
			<div class="menu-bg-wrap">
				<div class="site-navigation">
					<div class="row g-0 align-items-center">
						<div class="col-2">
							<a href="index.html" class="logo m-0 float-start">知文项目管理<span
								class="text-primary">.</span></a>
						</div>
						<div class="col-8 text-center">
							<form action="#" class="search-form d-inline-block d-lg-none">
								<input type="text" class="form-control" placeholder="Search...">
								<span class="bi-search"></span>
							</form>
							<ul
									class="js-clone-nav d-none d-lg-inline-block text-start site-menu mx-auto">
								<li class="active"><a href="index.html">首页</a></li>

								<li class="allPost has-children">
									<a href="blog.html">项目公告</a>
									<ul class="dropdown">
										<li><a href="searchType.html?type=1">招标公告</a></li>
										<li><a href="searchType.html?type=2">中标公告</a></li>
										<li><a href="searchType.html?type=3">其他公告</a></li>
									</ul>
								</li>
								<li><a href="category.html">公司新闻</a></li>
								<li><a href="laws.html">法律法规</a></li>
								<li><a href="about.html">关于我们</a></li>
							</ul>
						</div>
						<div class="col-2 text-end">
							<a href="#"
								class="burger ms-auto float-end site-menu-toggle js-menu-toggle d-inline-block d-lg-none light">
								<span></span>
							</a>
							<form action="" onsubmit="return false" class="search-form d-none d-lg-inline-block">
								<input type="text" class="form-control" placeholder="搜索..." id="searchContent" @keydown.enter="search">
								<span class="bi-searchs"></span>
							</form>
						</div>
						
					</div>
				</div>
			</div>
		</div>
	</nav>
<div class="cbt">
	<div class="section search-result-wrap" style="margin-right:100px">
		<div class="container">
<!--			<div class="row" style="width: 100%;background-color: ">-->
<!--				<div class="col-12" style="font-weight:30px;text-align: center;line-height:76px">-->
<!--					<div class="heading" style="background-color:#214252"><span style="color:red;font-size:40px">{{tname}}</span></div>-->
<!--				</div>-->
<!--			</div>-->
			<div class="row posts-entry">
				<div class="col-lg-8">
					<div  class="blog-entry d-flex blog-entry-search-item" v-for="(item,index) in onePagePosts" style="width: 100%" >
						<div>
							<span class="date">{{item.createDate.split(" ")[0]}}
								<img src="images/view.png" style="height:20px !important;width:20px !important;">
								<span v-if="item.viewCount > 0">{{item.viewCount}}</span>
								<span v-else>0</span>
							</span>
							<h2>
								<a href="javascript:void(0)"  @click="goToCheck(item.id)">{{item.title}}</a>
							</h2>
								<a href="javascript:void(0)" class="btn btn-sm btn-outline-primary" @click="goToCheck(item.id)">查看</a>
							</p>
						</div>
					</div>
					<div class="row text-start pt-5 border-top">
						<div class="col-md-12">
							<div class="custom-pagination">
								<a href="javascript:void(0)" @click="toTopPage(1)">首</a>
								<a href="javascript:void(0)" v-if="nowPage - 1 >= 1" @click="pagings(-1)">{{nowPage - 1}}</a>
								<a href="javascript:void(0)" style="background-color: darkgreen">{{nowPage}}</a>
								<a href="javascript:void(0)" v-if="nowPage + 1 <= page" @click="pagings(1)">{{nowPage + 1}}</a>
								<a href="javascript:void(0)" @click="toTopPage(-1)">尾</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
	<div id="overlayer"></div>
	<div class="loader">
		<div class="spinner-border text-primary" role="status">
			<span class="visually-hidden">Loading...</span>
		</div>
	</div>
	<script src="static/js/bootstrap.bundle.min.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/tiny-slider.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/flatpickr.min.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/aos.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/glightbox.min.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/navbar.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/counter.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script src="static/js/custom.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script async="" src="static/js/js.js"
		type="2016f221146da810e0aa877a-text/javascript"></script>
	<script type="2016f221146da810e0aa877a-text/javascript">window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag("js", new Date()); gtag("config", "UA-166033648-1");</script>
	<script src="static/js/rocket-loader.min.js" data-cf-settings="2016f221146da810e0aa877a-|49" defer=""></script>
    
    <!-- jquery vue -->
	<script src="js/jquery-3.6.0.js"></script>
	<script src="js/vue.js"></script>
	<script src="js/axios.min.js"></script>
	<script src="js/show-dialog.js"></script>
	<script src="js/checkLogin.js"></script>
	<script type="text/javascript" src="../back/js/layui.all.js" charset="utf-8"></script>
	<script type="text/javascript" src="../back/js/showpic.js" charset="utf-8"></script>
	<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
	<script>
	     let app1 = new Vue({
	    	 el:'.cbt',
	    	 data:{
	    		 posts:[],
	    		 tname:'',
	    		 limit:10,
	    		 tno:0,
				 nowPage:1,
	    		 onePagePosts:[],
	    		 page:0
	    	 },
	    	 methods:{
	    		 goToCheck(id){
	    			 //sessionStorage.setItem("id",id);
	    			 window.open("single.html?" + id);
	    		 },
	    		 paging(page){
					  this.onePagePosts = this.posts.slice(this.limit*(page-1),this.limit*page);
				 },
				 add(){
					 if(sessionStorage.getItem("mno") == "undefined"){
						 showmsg("请先登录...","red");
					 }
					 sessionStorage.setItem("tno",this.tno);
					 location.href="add.html";
				 },
				 pagings(count){
					 if(count == 1){
						 if(this.nowPage + 1 <= this.page){
							 this.nowPage = this.nowPage + 1;
							 this.onePagePosts = this.posts.slice(this.limit*(this.nowPage-1),this.limit* this.nowPage);
						 }
					 }else if(count == -1){
						 if(this.nowPage - 1 >= 1){
							 this.nowPage = this.nowPage - 1;
							 this.onePagePosts = this.posts.slice(this.limit*(this.nowPage-1),this.limit* this.nowPage);
						 }
					 }

				 },
				 toTopPage(count){
					 if(count == 1){
						 this.nowPage = 1;
						 this.onePagePosts = this.posts.slice(this.limit*(this.nowPage-1),this.limit* this.nowPage);
					 }else if(count == -1){
						 this.nowPage = this.page;
						 this.onePagePosts = this.posts.slice(this.limit*(this.nowPage-1),this.limit* this.nowPage);
					 }
				 }
	    	 },
	    	 mounted:function(){
	    		this.tname = sessionStorage.getItem("tname"); 
	 	 		if(location.href.indexOf("?") != -1){
	 	 			let tno = location.href.trim().split("?type=")[1];
	 	 			this.tno = tno;
	 	 			let params = new URLSearchParams();
	 	 			params.append("tno",tno)
	 	 			axios.get("/tender/findByType",{params}).then(resp=>{
	 	 				console.log(resp)
	 	 				this.posts = resp.data.data;
	 	 				this.page = resp.data.data.length % this.limit > 0 ? this.page = parseInt(resp.data.data.length / this.limit) + 1 : this.page = resp.data.data.length / this.limit;
	 	 				this.onePagePosts = resp.data.data.slice(0,this.limit);
	 	 			})
	 	 		}else{
	 	 			let tno = 1;
	 	 			let params = new URLSearchParams();
	 	 			params.append("tno",tno)
	 	 			axios.get("/tender/findByType",{params}).then(resp=>{
	 	 				this.posts = resp.data.data;
	 	 				this.page = resp.data.data.length % this.limit > 0 ? this.page = parseInt(resp.data.data.length / this.limit) + 1 : this.page = resp.data.data.length / this.limit;
	 	 				this.onePagePosts = resp.data.data.slice(0,this.limit);
	 	 			})
	 	 		}
	    	 }
	     })  
	     
	</script>
</body>
</html>
